Q drawers Class
Implements vertical drawers that work on most modern browsers, including ones on touchscreens.
Constructor
Q drawers
-
[options] -
[options.triggers=['{{Q}}/img/drawers/up.png', -
[options.fullscreen=Q.info.isMobile -
[options.beforeSwap=new -
[options.onSwap=new
Parameters:
-
[options]Object optionalOverride various options for this tool
-
[container=null]Element optionalOptional container element for handling scrolling
-
[initial]Object optionalInformation for the initial animation
-
[transition]Object optionalInformation for the transition animation
-
[width]Function optionalOverride the function that computes the width of the drawers
-
[height]Function optionalOverride the function that computes the height drawers tool
-
[heights=[100,100]Array optionalArray of [height0, height1] for drawers that are pinned. Can contain numbers or functions returning numbers, or names of functions.
-
[placeholders=['','']Array optionalArray of [html0, html1] for drawers that are pinned.
-
[behind=[true,false]Array optionalArray of [boolean0, boolean1] to indicate which drawer is behind the others
-
[bottom=[false,false]Array optionalArray of [boolean0, boolean1] to indicate whether to scroll to the bottom of a drawer after switching to it
-
[trigger]Object optionalOptions for the trigger elements
-
[rightMargin=10]Number optionalHow many pixels from the right side of the drawers
-
-
[transition=300]Number optionalNumber of milliseconds for fading in the trigger images
-
[foregroundZIndex=50]Number optionalThe z-index of the drawer in the foreground
-
-
[options.triggers=['{{Q}}/img/drawers/up.png',Array'{{Q}}/img/drawers/down.png']] Array of [src0, src1] for img elements that act as triggers to swap drawers. Set array elements to false to avoid rendering a trigger.
-
[options.fullscreen=Q.info.isMobileBoolean&& Q.info.isAndroid(1000)]] Whether the drawers should take up the whole screen
-
[options.beforeSwap=newNumberQ.Event()] Occurs right before drawer swap
-
[options.onSwap=newNumberQ.Event()] Occurs right after drawer swap